﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FA.Library.Util;
using System.ComponentModel;

namespace FA.Library.Sim.Aircraft
{
    public interface AircraftEngine : ICloneable, INotifyPropertyChanged
    {
        /// <summary>
        /// Number of engines.
        /// </summary>
        int NumEngines { get; }

        /// <summary>
        /// Selected engines (combination of bit flags).
        /// </summary>
        int SelectedEnginesMask { get; set; }

        /// <summary>
        /// Engine type enumeration.
        /// </summary>
        int EngineTypeEnum { get; }

        /// <summary>
        /// Throttle lever.
        /// </summary>
        int ThrottleLeverPosition { get; set; }

        /// <summary>
        /// Mixture lever.
        /// </summary>
        int MixtureLeverPosition { get; set; }

        /// <summary>
        /// Propeller lever.
        /// </summary>
        int PropellerLevelPosition { get; set; }

        /// <summary>
        /// Percent throttle defining lower limit (negative for reverse thrust equipped airplanes).
        /// </summary>
        int ThrottleLowerLimit { get; }

        /// <summary>
        /// Engine 1 RPM.
        /// </summary>
        float Engine1RPM { get; }

        /// <summary>
        /// Engine 2 RPM.
        /// </summary>
        float Engine2RPM { get; }

        /// <summary>
        /// Engine 1 failed flag.
        /// </summary>
        bool Engine1FailFlag { get; }

        /// <summary>
        /// Engine 2 failed flag.
        /// </summary>
        bool Engine2FailFlag { get; }

        /// <summary>
        /// Engine 1 on fire flag.
        /// </summary>
        bool Engine1OnFireFlag { get; set; }

        /// <summary>
        /// Engine 2 on fire flag.
        /// </summary>
        bool Engine2OnFireFlag { get; set; }

        /// <summary>
        /// Combustion flag.
        /// </summary>
        bool CombustionFlag { get; set; }

        /// <summary>
        /// Aircraft master ignition switch (grounds all engines’ magnetos).
        /// </summary>
        bool MasterIgnitionSwitch { get; }

        /// <summary>
        /// Master alternator (generator) switch.
        /// </summary>
        bool MasterAlternatorSwitch { get; }

        /// <summary>
        /// Engine 1 alternator (generator) on/off.
        /// </summary>
        bool Engine1Alternator { get; set; }

        /// <summary>
        /// Engine 2 alternator (generator) on/off.
        /// </summary>
        bool Engine2Alternator { get; set; }
    }
}